package com.boken.caelum.common.service;

import java.util.List;

public interface BaseService<M,E> {

	int countByExample(E example);

	int deleteByExample(E example);

	int deleteByPrimaryKey(Object id);

	int insert(M model);

	int insertSelective(M model);

	List<M> selectByExample(E example);

	M selectByPrimaryKey(Object id);

	M selectOneByExample(E example);

	int updateByExampleSelective(M model, E example);

	int updateByPrimaryKeySelective(M model);

	int updateByExample(M model, E example);

	int updateByPrimaryKey(M model);

	List<M> selectPageByExample(Integer pageNum, Integer pageSize, E example);
}